jQuery(document).ready(function($)
{
    /* import demo data */

    $(".import-demo-data").click(function()
    {
        var _self=$(this), wp_nonce = $("input[name=_wp_nonce]").val(), wp_http_referer = $("input[name=_wp_http_referer]").val();
        $.ajax(
        {
            type: 'POST',
            url: ajaxurl,
            data: {action: 'wiloke-import', _wp_nonce: wp_nonce, _wp_http_referer: wp_http_referer},
            beforeSend:function()
            {
                _self.html("Importing...");
                // _self.attr("disabled", true);
            },
            success: function(res)
            {
                _self.html("Imported");
                $(".wo-alert").html(res);
            }

        })
        return false;
    })//end document ready

})